import React from 'react';
import styles from './index.module.less';

export default function Descriptions({ title = '', descriptions = [], style, className }) {
    return (
        <div style={style} className={className}>
            <div className={styles.title}>{title}</div>
            {descriptions.map(item => (
                <div className={styles.itemWrap} key={item.label}>
                    <span className={styles.itemLabel}>
                        {item.label}
                        <span>：</span>
                    </span>
                    <span className={styles.itemValue}>{item.value}</span>
                </div>
            ))}
        </div>
    );
}
